import request, { post, formPost, get,BASE_URL } from '../utils/request';

// export const fetchData = ()=> {
//     return get('./table.json'
//     );
// };
export {
    BASE_URL
}
//用户登录
export const userLogin = data => { return formPost('/login-center/login', data) }
//获取token
export const oauthtoken = data => { return formPost('/auth/oauth/token', data) }
//修改密码
export const changePassWord = data => { return formPost('/login-center/changePassword', data) }
//重置密码
export const resetPassword = data => { return formPost('user/resetPassword', data) }
//获取项目列表
export const getProjectList = data => { return post('/quality/project/list', data) }
//添加项目数据
export const addProject = data => { return formPost('/quality/project/addProject', data) }
//点击新建确认
export const confirmNew = data => { return formPost('/quality/project/confirmNew', data) }
//获取项目细化分解
export const specifyList = data => { return formPost('/quality/project/reportInfo', data) }
//更新项目细化分解
export const updateSpecify = data => { return post('/quality/project/updateSpecify', data) }
//缓存细化分解
export const savePreSpecify = data => { return post('/quality/project/savePreSpecify', data) }
//获取事业部列表
export const getdepList = data => { return formPost('/quality/dept/list', data) }
//事业部审核
export const deptCheck = data => { return formPost('/quality/project/deptCheck', data) }
//生产运营部审核
export const dpCheck = data => { return formPost('/quality/project/dpCheck', data) }
//新建事业部
export const addDept = data => { return formPost('/quality/dept/addDept', data) }
//项目部项目细化分解上报
export const progress = data => { return post('/quality/project/progress', data) }
//获取事业部下拉列表
export const findDepList = data => { return get('/quality/dept/findAll', data) }
//获取地址下拉列表
export const areaList = data => { return formPost('/quality/sys/areaList', data) }
//获取所有列表方法
export const findAll = data => { return post('/quality/project/findAll ', data) }
//获取所有事业部数据列表
export const findDeptAll = data => { return get('/quality/dept/findAll', data) }
//新建项目生成项目id
export const createProjectId = data => { return get('/quality/project/createProjectId ', data) }
export const createDeptId = data => { return get('/quality/dept/createDeptId ', data) }
//删除项目
export const delectObject = data => { return formPost('/quality/project/delProject', data) }
//修改项目的状态
export const updataProjectStatus = data => { return formPost('/quality/project/projectCmplete', data) }
export const allCategory = data => { return post('/quality/sys/allCategory', data) }
export const reportRecord = data => { return formPost('/quality/project/reportRecord', data) }

//根据数量计算产值
export const workOutput = data => { return formPost('/quality/project/workOutput', data) }
export const projectSatus = data => { return formPost('/quality/project/updateProjectStatus', data) }

// 用户管理
// 获取用户列表
export const userlist = data => { return get('/cost/user/list', data) }
// 新增用户
export const useradd = data => { return post('/cost/user/add', data) }
// 编辑用户
export const userupdate = data => { return post('/cost/user/update', data) }
// 删除用户
export const userdelete = data => { return formPost('/cost/user/delete', data) }

// 组织管理
export const organizationList = data => { return formPost('/cost/organization/list', data) }

// 公共
// 部门列表
export const commongetDepartmentList = data => { return get('/cost/common/getDepartmentList', data) }
// 组织列表
export const commongetOrganizationList = data => { return get('/cost/common/getOrganizationList', data) }
// 获取记录员/审核员列表
export const commongetRoleList = data => { return get('/cost/common/getRoleList', data) }
export const organizationAdd = data => { return formPost('/cost/organization/add', data) }
export const organizationDelete = data => { return formPost('/cost/organization/delete', data) }
export const organizationEdit = data => { return formPost('/cost/organization/edit', data) }
export const organizationUpdate = data => { return formPost('/cost/organization/update', data) }

// 角色管理
export const roleList = data => { return formPost('/cost/role/list', data) }
export const roleDetail = data => { return formPost('/cost/role/detail', data) }
export const roleAdd = data => { return post('/cost/role/add', data) }
export const roleEdit = data => { return post('/cost/role/edit', data) }
export const roleDelete = data => { return formPost('/cost/role/delete', data) }
export const roleUpdate = data => { return formPost('/cost/role/update', data) }

//****************************** */ 模板管理
//模板列表
export const modellist = data => { return get('/cost/model/list', data) }
//新增模板
export const modeladd = data => { return post('/cost/model/add', data) }
//删除模板
export const modeldelete = data => { return formPost('/cost/model/delete', data) }
// 获取所有模板列表
export const getModelList = data => { return get('/cost/common/getModelList', data) }
// 获取模板详情
export const modeldetail = data => { return formPost('/cost/model/detail', data) }
// 新项目
// 创建新项目获取项目id
export const commoncreateProjectId = data => { return get('/cost/common/createProjectId', data) }
// 项目分类列表
export const commongetCategoryList = data => { return get('/cost/common/getCategoryList', data) }
// 项目列表
export const projectlist = data => { return formPost('/cost/project/list', data) }
// 新建项目
export const projectadd = data => { return post('/cost/project/add', data) }
// 细化分解
export const projectdecomposition = data => { return post('/cost/project/decomposition', data) }
// 新建确认
export const projectconfirm = data => { return formPost('/cost/project/confirm', data) }
// 获取月报标题
export const projectgetMonthlyReportTitleList = data => { return formPost('/cost/project/getMonthlyReportTitleList', data) }
// 成本细化分解列表
export const projectspecifyList = data => { return formPost('/cost/project/specifyList', data) }
// 新增月报获取模板
export const projectgetReportModel = data => { return formPost('/cost/project/getReportModel', data) }
// 月报评审
export const projectVerifyl = data => { return post('/cost/project/verify', data) }
// 新增月报
export const projectaddMonthlyReport = data => { return post('/cost/project/addMonthlyReport', data) }
// 修改月报
export const projectupdateMonthlyReport = data => { return post('/cost/project/updateMonthlyReport', data) }
// 项目完成
export const projectcomplete = data => { return formPost('/cost/project/complete', data) }
// 组织查询
export const getOrganizationListLikeName = data => { return formPost('/cost/common/getOrganizationListLikeName', data) }
// 历史项目-能导出的项目
export const excelProjectList = data => { return formPost('/cost/excel/projectList', data) }
// 历史项目-能导出的项目
export const projectHistory = data => { return post('/cost/excel/project/history', data) }
// 项目详情
export const projectdetail = data => { return formPost('/cost/project/detail', data) }
// 获取区域
export const commonareaList = data => { return post('/cost/common/areaList', data) }
// 获取导出权限
export const commonjudgeExportRole = data => { return get('/cost/common/judgeExportRole', data) }

